<%--
  Created by IntelliJ IDEA.
  User: lutao
  Date: 2017/7/18
  Time: 13:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
    <%@ include file="/common/include-core.jsp" %>
    <%@ include file="/common/jspTemplate.jsp" %>
    <script type="text/javascript" src="/static/js/admin/resource/resourceRelation.js"></script>
    <title>资源分类列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 资源管理 <span class="c-gray en">&gt;</span> 资源分类列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form action="/admin/resource/getResourceRelationList.html" method="post" id="searchForm">
            <input type="hidden" id="count" value="${pageInfo.total }" />
            <input type="hidden" id="page" name="page" value="${pageInfo.pageNum }" />
            <input type="hidden" id="pageSize" name="pageSize" value="${pageInfo.pageSize }" />
            <input type="text" name="resourceName"  value="${bean.resourceName }" placeholder=" 请输入你要查询的活动标题" style="width:250px" class="input-text">
            <button name="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="layerTools.layerShowFullScreen('添加资源','/admin/resource/resourceRelation.html?resourceRelationId=${bean.resourceRelationId}','')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加资源</a></span> <%--<span class="r">共有数据：<strong>54</strong> 条</span> --%></div>
    <div class="mt-20 portfolio-content">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th>资源名称</th>
                <th>资源类型</th>
                <th>资源关系类型</th>
                <th>资源地址</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>

            <c:forEach items="${pageInfo.list}" var="item" varStatus="index">
                <tr class="text-c">
                    <td>${item.resourceName}</td>
                    <td class="td-status">
                        <c:if test="${item.resourceType==1}"><span class="label label-defaunt radius">图片</span></c:if>

                        <c:if test="${item.resourceType==2}"><span class="label label-success radius">视频</span></c:if>
                    </td>
                    <td class="td-status">
                        <c:if test="${item.resourceRelationType==1}"><span class="label label-defaunt radius">产品</span></c:if>

                        <c:if test="${item.resourceRelationType==2}"><span class="label label-success radius">产品实体</span></c:if>
                        <c:if test="${item.resourceRelationType==4}"><span class="label label-success radius">订单</span></c:if>
                    </td>

                    <td  onclick="showPic('${item.resourceUrl}')">${item.resourceUrl}</td>

                    <td class="td-manage">


                        <a style="text-decoration:none" class="ml-5" onClick="layerTools.layerShowFullScreen('资源类型编辑','/admin/resource/resourceRelation.html?tid=${item.tid}','')"
                           href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe60c;</i></a>
                        <a style="text-decoration:none" class="ml-5" onClick="deleteResourceRelation(${item.tid});"
                           href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="ui-page tr mt10" style="float: right;margin-top: 10px;margin-bottom: 10px"></div>
    </div>
</div>
<!--/请在上方写此页面业务相关的脚本-->
<%@ include file="/common/include-footer.jsp" %>

</body>
</html>
